﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FarmerOrders.aspx.cs" Inherits="NJL.WebManage.Orders.FarmerOrders" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <script src="/Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="/Scripts/js/jquery.skygqbox.1.3.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="/Scripts/DatePicker/WdatePicker.js"></script>
    <script type="text/javascript">
        function tickvalue(id) {
            var iframesrc = document.getElementById("tick").src = "OrderDetails.aspx?id=" + id;
        }
    </script>
    <style type="text/css">
        .onshow
        {
            background: #d6e6f5;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="main_content fr">
        <div class="gray_bd">
            <div class="table_title">
                商户订单管理</div>
            <div id="dispArea" runat="server">
                &nbsp;&nbsp;地区：
                <asp:DropDownList ID="ddlarea" runat="server">
                </asp:DropDownList>
            </div>
            <div>
                <table>
                    <tr>
                        <td>
                            订单号：
                        </td>
                        <td>
                            <asp:TextBox ID="txtKeywords" runat="server" Width="100px"></asp:TextBox>
                        </td>
                        <td>
                            取票人名称：
                        </td>
                        <td>
                            <asp:TextBox ID="txtPickName" runat="server" Width="100px"></asp:TextBox>
                        </td>
                        <td>
                            取票人手机：
                        </td>
                        <td>
                            <asp:TextBox ID="txtPickTel" runat="server" Width="100px"></asp:TextBox>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            时间：
                        </td>
                        <td>
                            <asp:TextBox ID="txtStartTime" runat="server" Width="100px" onclick="WdatePicker()"></asp:TextBox>至<asp:TextBox
                                ID="txtEndTime" runat="server" Width="100px" onclick="WdatePicker()"></asp:TextBox>
                        </td>
                        <td>
                            商铺名称：
                        </td>
                        <td>
                            <asp:TextBox ID="txtCompanyName" runat="server" Width="100px"></asp:TextBox>
                        </td>
                        <td>
                            门票类型：
                        </td>
                        <td>
                            <asp:TextBox ID="txtTicketType" runat="server" Width="100px"></asp:TextBox>
                        </td>
                        <td>
                            <asp:Button ID="btnSearch" runat="server" Text="搜索" OnClick="btnSearch_Click" />
                        </td>
                    </tr>
                </table>
            </div>
            <div style="margin-left: 5px">
            </div>
            <div class="pad5px">
                <div class="border_b_dotted">
                    <table class="tableliststyle" cellspacing="0" rules="all" border="1">
                        <tr class="gridheader">
                            <th style="width: 40px;">
                                序号
                            </th>
                            <th>
                                订单编号
                            </th>
                            <th>
                                商铺名称
                            </th>
                            <th>
                                数量
                            </th>
                            <th>
                                订票类型
                            </th>
                            <th>
                                游玩日期
                            </th>
                            <th>
                                预定人
                            </th>
                            <th>
                                预定人手机
                            </th>
                            <th>
                                取票人
                            </th>
                            <th>
                                取票人手机
                            </th>
                            <th>
                                创建时间
                            </th>
                            <th>
                                用户类型
                            </th>
                            <th>
                                短信
                            </th>
                            <th>
                                最近发送短信时间
                            </th>
                            <th>
                                订单状态
                            </th>
                        </tr>
                        <asp:Repeater ID="rptUserList" runat="server" OnItemCommand="rptUserList_ItemCommand"
                            OnItemDataBound="rptUserList_ItemDataBound">
                            <ItemTemplate>
                                <tr onmouseover="this.className='onshow'" onmouseout="this.className=''" class="">
                                    <td align="center">
                                        <asp:Literal ID="litNum" runat="server"></asp:Literal>
                                    </td>
                                    <td align="center">
                                        <a href="javascript:$('#win').skygqbox();tickvalue('<%#Eval("ID") %>')">
                                            <%#Eval("ORDER_NO")%></a>
                                    </td>
                                    <td>
                                        <asp:Literal ID="litName" runat="server"></asp:Literal>
                                    </td>
                                    <td align="right">
                                        <%#Eval("TICKET_COUNT")%>
                                    </td>
                                    <td>
                                        <asp:Literal ID="litType" runat="server"></asp:Literal>
                                    </td>
                                    <td>
                                        <%#Eval("VISIT_DATE","{0:yyyy-MM-dd}")%>
                                    </td>
                                    <td align="center">
                                        <%#Eval("BOOK_NAME")%>
                                    </td>
                                    <td align="center">
                                        <%#Eval("BOOK_MOBILE")%>
                                    </td>
                                    <td align="center">
                                        <%#Eval("PICK_NAME")%>
                                    </td>
                                    <td align="center">
                                        <%#Eval("PICK_MOBILE")%>
                                    </td>
                                    <td align="center">
                                        <%#Eval("CREATE_DATE_TIME", "{0:yyyy-MM-dd HH:mm:ss}")%>
                                    </td>
                                    <td>
                                        <%#Eval("IS_REGISTER_USER").ToString()=="0"?"<font color='red'>非注册<font>":"已注册"%>
                                    </td>
                                    <td align="right">
                                        <%#!string.IsNullOrEmpty(Eval("SEND_SMS_COUNT").ToString()) && Convert.ToInt32(Eval("SEND_SMS_COUNT")) > 5 ? "<font color='red'>" + Eval("SEND_SMS_COUNT") + "<font>" : Eval("SEND_SMS_COUNT")%>
                                    </td>
                                    <td>
                                        <%#Eval("SEND_SMS_LAST_DATE_TIME")%>
                                    </td>
                                    <td align="center">
                                        <asp:Literal ID="litOrderState" runat="server"></asp:Literal>
                                    </td>
                                </tr>
                            </ItemTemplate>
                   
                        </asp:Repeater>
                    </table>
                </div>
                <div style="text-align: center">
                    共
                    <asp:Literal ID="lit" runat="server"></asp:Literal>
                    条记录&nbsp;&nbsp;&nbsp;&nbsp; 共
                    <asp:Literal ID="litAllPage" runat="server"></asp:Literal>
                    页&nbsp;&nbsp;&nbsp;&nbsp; 第
                    <asp:Literal ID="litCurrentPage" runat="server"></asp:Literal>
                    页
                    <asp:LinkButton ID="lbtnFirst" runat="server" OnClick="lbtnFirst_Click">首页</asp:LinkButton>&nbsp;
                    <asp:LinkButton ID="lbtnPrev" runat="server" OnClick="lbtnPrev_Click">上一页</asp:LinkButton>&nbsp;
                    <asp:LinkButton ID="lbtnNext" runat="server" OnClick="lbtnNext_Click">下一页</asp:LinkButton>&nbsp;
                    <asp:LinkButton ID="lbtnEnd" runat="server" OnClick="lbtnEnd_Click">末页</asp:LinkButton>
                    跳转到第
                    <asp:TextBox ID="txtPage" runat="server" Width="32px" MaxLength="8" Style="text-align: center"></asp:TextBox>&nbsp;页&nbsp;
                    <asp:Button ID="btnRir" runat="server" Text="确定" OnClick="btnRir_Click" />
                </div>
            </div>
        </div>
        <asp:HiddenField ID="HSelectId" runat="server" />
    </div>
    <div id="win" style="padding: 10px; display: none; width: 740px">
        <iframe id="tick" width="720" height="420" scrolling="auto"></iframe>
    </div>
    </form>
</body>
</html>
